#!/usr/bin/env bash
/usr/bin/redis-cli -p 26379 -h redis-sentinel.service.consul info sentinel \
  | grep -w {{ bind_address | quote }} \
  || exit 231

if [[ $? == 0 ]]; then
  /usr/bin/redis-cli -p 6379 -h {{ bind_address }} info replication | grep -w "role\:master" || exit 231
fi
